﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed
#pragma once
#include "IPositionGeometry.h"

namespace gcmp
{
    class IDocument;
    class IPolyCurve;
    class Vector3d;
    class ElementId;
    /// \brief 多段线定位类
    class GCMP_MODEL_INTERFACE_EXPORT IPositionPolyCurve2d : public IPositionGeometry
    {
        DEFINE_CAST_DERIVED(gcmp::IPositionPolyCurve2d, gcmp::IPositionGeometry)
    public:
        /// \brief 创建多段线定位对象
        /// \param pElement 元素指针
        /// \param baseCurves 基准线集合
        /// \return 多段线定位对象
        static OwnerPtr<IPositionPolyCurve2d> Create(IElement *pElement, OwnerPtr<IPolyCurve> opBaseCurve);

    public:
        /// \brief 得到基准多段线
        /// \return 基准多段线
        virtual const IPolyCurve* GetBaseCurve() const = 0;

        /// \brief 得到基准多段线
        /// \return 基准多段线
        virtual IPolyCurve* GetBaseCurve() = 0;

        /// \brief 设置基准多段线
        /// \param baseCurve 基准多段线
        /// \return 返回true表示成功设置，否则表示失败 
        virtual bool SetBaseCurve(OwnerPtr<IPolyCurve> opBaseCurve) = 0;
    };
}


